package test.maven;

import com.whalin.MemCached.MemCachedClient;
import com.whalin.MemCached.SockIOPool;

public class MemTest2 {
	
	public static void main(String[] args) {
		MemCachedClient client=new MemCachedClient();  
        String [] addr ={"192.168.209.128:11211"};  
        Integer [] weights = {5};  
        SockIOPool pool = SockIOPool.getInstance();  
        pool.setServers(addr);  
        pool.setWeights(weights);  
        pool.setInitConn(5);  
        pool.setMinConn(5);  
        pool.setMaxConn(200);  
        pool.setMaxIdle(1000*30*30);  
        pool.setMaintSleep(30);  
        pool.setNagle(false);  
        pool.setSocketTO(30);  
        pool.setSocketConnectTO(0);  
        pool.initialize();  
          
//      String [] s  =pool.getServers();  
          
//      将数据放入缓存  
        System.out.println(client.get("test1"));  
        System.out.println(client.get("test2"));  
        System.out.println(client.get("test3"));  
        System.out.println(client.get("test4"));  
        System.out.println(client.get("test5"));  
        System.out.println(client.get("test6"));  
        System.out.println(client.get("test7"));  
        System.out.println(client.get("test8"));  
          
	}

}
